<%@ tag language="java" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<%@ attribute name="content" type="java.lang.String" required="true" description="消息内容" %>
<c:if test="${not empty content}">
    <script type="text/javascript">
        $(document).ready(function() {
            if (iziToast) {
                iziToast.show({
                    message: '${content}'
                    ,position: 'topCenter'
                    ,transitionIn: 'bounceInDown'
                    ,color: '${fn:contains(content,'失败') || fn:contains(content,'错误') || fn:contains(content,'异常')?'red':'green'}'
                    ,icon: '${fn:contains(content,'失败') || fn:contains(content,'错误') || fn:contains(content,'异常')? 'ico-error':'ico-success'}'
                    ,timeout: '${fn:contains(content,'失败') || fn:contains(content,'错误') || fn:contains(content,'异常')?'10000':'2500'}'
                });
            }
        });
    </script>
</c:if>